<template>
  <div>
    <h1>{{ msg }}</h1>
    <button @click="revFn">点击翻转</button>
  </div>
</template>

<script>
export default {
  name: "Homework2App",

  data() {
    return {
      msg: "ILOVEYOU",
    };
  },

  methods: {
    revFn() {
      this.msg = this.msg.split("").reverse().join("");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>